<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<?php
include_once '../objects/person.php';
session_start();
if (!isset($_SESSION['user'])) {
    header("location: ../../index.php");
} else {
    $user = $_SESSION['user'];
    if ($user->getRolperson() == 0) {
        header("location: ../../index.php");
    }
}
?>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>* SEPC *</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" type="text/css" href="../../style/bootstrap.css">
        <link rel="stylesheet" type="text/css" href="../../style/bootstrap-responsive.css">
        <link rel="stylesheet" type="text/css" href="../../style/styles.css">
    </head>
    <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a>
                    <a href="../../index.php" class="brand"><img src="../../img/sepc_logo.png" alt=""></a>
                    <div class="nav-collapse">
                        <ul class="nav">
                            <li class="nav-header"><h3>.: Perfil de Usuario :.</h3></li>
                            <li><a></a></li><li><a></a></li><li><a></a></li><li><a></a></li>
                            <li><a></a></li><li><a></a></li><li><a></a></li><li><a></a></li>
                            <li><a></a></li>
                            <li class="right"><a href="userProfile.php"><?php echo $user->getMail();?></a></li>                            
                        </ul>
                        <form class="navbar-form pull-right" name="" action="../closeConexion.php" method="post" >
                            <button type="submit" class="btn btn-danger"><i class="icon-remove-sign  icon-white"></i> Cerrar Session</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <br>
        <div class="container">
            <div class="row-fluid">
                <ul class="pager ">
                    <li class="previous">
                        <a class="badge-success" href="userProfile.php"><i class="icon-arrow-left icon-white"></i></a>
                    </li>
                    <li class="next disabled">
                        <a class="badge-success" href="#"><i class="icon-arrow-right icon-white"></i></a>
                    </li>
                </ul>
                <legend></legend>
                <div class="span2"></div>
                <div class="span8">
                    <form action="../servlet.php?action=updatePerson" name="updatePerson" method="post" class="form-horizontal">
                        <table align='center'>
                            <tbody>
                                <tr>
                                    <td><label for="name" class="control-label">Nombre:</label></td>
                                    <td><input type="text" name="name" id="name" readonly="readonly" placeholder="<?php echo $user->getNameuser(); ?>"/></td>
                                </tr>
                                <tr>
                                    <td><label for="lastname" class="control-label">Apellido:</label></td>
                                    <td><input type="text"  name="lastname" id="lastname" readonly="readonly" placeholder="<?php echo $user->getLastname(); ?>"/></td>
                                </tr>
                                <tr>
                                    <td><label for="docnum" class="control-label">Numero de Identificaci&oacute;n:</label></td>
                                    <td><input type="text" name="docnum" id="docnum" readonly="readonly" placeholder="<?php echo $user->getDocnum(); ?>"/></td> 
                                    <input name="userid" id="userid" value="<?php echo $user->getDocnum(); ?>" type="Hidden">
                                <tr>
                                    <td><label for="mail" class="control-label">E-mail:</label></td>
                                    <td><input type="email" name="mail" id="mail" readonly="readonlly" placeholder="<?php echo $user->getMail(); ?>"/></td>                                
                                </tr>
                                <tr>
                                    <td><label for="passwd" class="control-label">Contraseña:</label></td>
                                    <td><input type="password" name="passwd" id="passwd"/></td>
                                </tr>
                                <tr>
                                    <td><label for="passwd2" class="control-label">Repita su Contraseña:</label></td>
                                    <td><input type="password" name="passwd2" id="passwd2"></td>
                                </tr>
                                <tr>
                                    <td><label for="address" class="control-label">Direcci&oacute;n:</label></td>
                                    <td><input type="text" name="address" id="address"/></td>
                                </tr>
                                <tr>
                                    <td><label for="phone" class="control-label">Tel&eacute;fono:</label></td>
                                    <td><input type="tel" name="phone" id="phone"/></td>
                                </tr>
                            </tbody>
                        </table>
                        <div class="form-actions" align="center">
                            <button type="submit" class="btn btn-primary"><i class="icon-check icon-white"></i> Actualizar</button>
                            <a href="userProfile.php" class="btn btn-danger"><i class="icon-remove icon-white"></i> Cancelar</a>
                        </div>
                    </form>
                </div>
                <div class="span2"></div>                
            </div>
            <footer class="footer">
            <div class="container">
                <small> 
                    <img src="../../img/unicor_logo.png">
                    <strong>    Universidad de Cordoba. Facultad de Ingen&iacute;erias :: Departamento de Ingen&iacute;eria de Sistemas y Telecomunicaciones</strong>
                    <br>
                    Dise&ntilde;ado y Desarrollado por: Mar&iacute;a Alejandra Teher&aacute;n &amp; Daniela Mu&ntilde;oz De La Rosa &copy;
                </small>
            </div>
        </footer>
        </div>
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/bootstrap.js"></script>
        <script type="text/javascript" src="js/bootstrap-collapse.js"></script>
    </body>
</html>
